<template>
  <div class="hmnavbar">
    <van-nav-bar @click-left="$router.push(path)" @click-right="clickRight">
      <template #left>
        <i class="iconfont f44" v-if="showLeft">&#xe637;</i>
      </template>
      <template #title>
        <span class="title">{{ title }} </span>
      </template>
      <template #right>
        <span class="right">{{ right }} </span>
      </template>
    </van-nav-bar>
  </div>
</template>
<script>
export default {
  data () {
    return {}
  },
  // props: ['path', 'title', 'right','showLeft'],
  props: {
    path: { type: String, default: undefined },
    title: { type: String, default: undefined },
    right: { type: String, default: undefined },
    showLeft: { type: Boolean, default: true }
  },
  methods: {
    clickRight () {
      this.$emit('rightClick')
    }
  }
}
</script>
<style lang="less" scoped>
.hmnavbar {
  &::v-deep .van-nav-bar__left,
  &::v-deep .van-nav-bar__right {
    padding: 0;
  }
  .f44 {
    font-size: 44px;
  }
  .title {
    font-size: 18px;
    font-family: PingFangSC, PingFangSC-Semibold;
    font-weight: 600;
    text-align: center;
    color: #222222;
    line-height: 25px;
    letter-spacing: 0px;
  }
  .right {
    font-size: 14px;
    font-family: PingFangSC, PingFangSC-Regular;
    font-weight: 400;
    text-align: right;
    color: #181a39;
    line-height: 20px;
    letter-spacing: 0px;
    padding-right: 15px;
  }
}
</style>
